From: Caolán McNamara Date: Sun, 12 Jul 2026 18:57:00 +0000 (+0000) Subject: [PATCH] sc: only build the supported data providers when loading a document X-Git-Tag: archive/raspbian/4%25.2.3-2+rpi1+deb13u8^2~8 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4e452279af1c60bc56f936efa2353cc783670c95;p=libreoffice.git [PATCH] sc: only build the supported data providers when loading a document Build a data mapping only for the csv, html and xml providers. Any other provider name in the document is ignored. The sql provider is not included. It never worked and was dropped from the Data Provider dialog in tdf#169079. Signed-off-by: Caolán McNamara Change-Id: Iaa8b5ae4f37693d82938c12b725ee05a3b115732 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6708 Tested-by: Jenkins CPCI Reviewed-by: Miklos Vajna (cherry picked from commit 9b6d7ec607e68c79ce685f126139ef826776e783) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208149 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 104d2b4f5dae917661b20b18d5d2043fca4407e4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208159 Tested-by: Ilmari Lauhakangas Reviewed-by: Hossein Reviewed-by: Ilmari Lauhakangas Gbp-Pq: Name CVE-2026-63268-2.diff --- diff --git a/sc/source/filter/xml/xmlmappingi.cxx b/sc/source/filter/xml/xmlmappingi.cxx index 2048c929d21..809a3cd7256 100644 --- a/sc/source/filter/xml/xmlmappingi.cxx +++ b/sc/source/filter/xml/xmlmappingi.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -102,6 +103,16 @@ ScXMLMappingContext::ScXMLMappingContext( ScXMLImport& rImport, if (!aProvider.isEmpty()) { + // Only build the data providers we support. The sql provider is left + // out: it was never finished and was dropped from the dialog in tdf#169079. + if (aProvider != "org.libreoffice.calc.csv" + && aProvider != "org.libreoffice.calc.html" + && aProvider != "org.libreoffice.calc.xml") + { + SAL_WARN("sc", "ignoring document data mapping for provider \"" << aProvider << "\""); + return; + } + ScDocument* pDoc = GetScImport().GetDocument(); auto& rDataMapper = pDoc->GetExternalDataMapper(); sc::ExternalDataSource aSource(aURL, aProvider, pDoc);